﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace Barbar.MapReport.DataSource.Facade {
  [XmlTypeAttribute(TypeName="Region")]
  public class SimpleRegion : IRawRegion {
    private string m_Id;
    private string m_ParentId;
    private string m_Name;

    public SimpleRegion() {
    }

    public SimpleRegion(Region region) {
      m_Id = region.Id;
      if (region.Parent != null)
        m_ParentId = region.Parent.Id;
      m_Name = region.Name;
    }

    #region IRawRegion Members

    public string Id {
      get { return m_Id; }
      set { m_Id = value; }
    }

    public string ParentId {
      get { return m_ParentId; }
      set { m_ParentId = value; }
    }

    public string Name {
      get { return m_Name; }
      set { m_Name = value; }
    }

    #endregion
  }
}
